/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
* Description: Initialize the kallsyms symbol buffer
* Author: Huawei OS Kernel Lab
* Create: Tue Apr 17 02:24:01 2023
*/
#include <asm/bitsperlong.h>
#if BITS_PER_LONG == 64
#define PTR .quad
#define ALGN .balign 8
#else
#define PTR .long
#define ALGN .balign 4
#endif
	.section .kallsyms, "a"

/* Initialize kallsyms_* pointers */
.globl kallsyms_offsets
	ALGN
kallsyms_offsets:
	PTR	buildin_kallsyms_offsets

.globl kallsyms_names
	ALGN
kallsyms_names:
	PTR	buildin_kallsyms_names

.globl kallsyms_token_table
	ALGN
kallsyms_token_table:
	PTR	buildin_kallsyms_token_table

.globl kallsyms_token_index
	ALGN
kallsyms_token_index:
	PTR	buildin_kallsyms_token_index

.globl kallsyms_markers
	ALGN
kallsyms_markers:
	PTR	buildin_kallsyms_markers

.globl kallsyms_num_syms
	ALGN
kallsyms_num_syms:
	.long	0

/*
 * When KALLSYMS is turned on, the first element of
 * the symbol buff will be accessed even though
 * kallsyms_num_syms is '0'. So initialize the first
 * element to prevent out-of-bounds access.
 */
.globl buildin_kallsyms_offsets
	ALGN
buildin_kallsyms_offsets:
	.long 0

.globl buildin_kallsyms_names
	ALGN
buildin_kallsyms_names:
	.byte 0x0

.globl buildin_kallsyms_markers
	ALGN
buildin_kallsyms_markers:
	.long 0

.globl buildin_kallsyms_token_table
	ALGN
buildin_kallsyms_token_table:
	.asciz	""

.globl buildin_kallsyms_token_index
	ALGN
buildin_kallsyms_token_index:
	.short	0
